#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QMessageBox>
#include <QFileDialog>
#include "ftpAccessManager.h"


QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

public slots:
    void on_selectUploadPushButton_clicked();

private slots:
    void on_pushButtonDownload_clicked();
    void on_pushButtonUpload_clicked();

    void uploadProgressSlot(qint64, qint64);
    void downloadProgressSlot(qint64, qint64);
    void netErrorSlot(QNetworkReply::NetworkError);
private:
    bool getHostInfoFromUi();

private:
    Ui::Widget *ui;
    ftpAccessManager mFtpAccMgr;
    QString ftpServerHost;
    qint16  ftpServerPort;
    QString ftpServerUsr;
    QString ftpServerPasswd;
};
#endif // WIDGET_H
